package com.wu.common.page;

import java.io.Serializable;

public class Pagenation implements Serializable {
    private static final long serialVersionUID = 1L;
    private int pageSize;
    private int pageNo;
    private int itemCount;
    private int pageCount;

    public Pagenation(int pageNo, int itemCount, int pageSize) {
        this.pageNo = pageNo;
        this.pageSize = pageSize;
        this.itemCount = itemCount;
        this.pageCount = (int)Math.ceil((double)itemCount / (double)pageSize);
    }

    public int getPageCount() {
        return this.pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNo() {
        return this.pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getItemCount() {
        return this.itemCount;
    }

    public void setItemCount(int itemCount) {
        this.itemCount = itemCount;
    }
}

